home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 426-450 / disk_434 / backup / backup.doc < prev    next >
Text File  |  1992-05-06  |  16KB  |  449 lines

  1.  
  2.                    BACKUP.DOC
  3.  
  4.                  V2.06
  5.  
  6.                 1 August 1990
  7.      (c)Copyright 1988-1989, Matthew Dillon, All Rights Reserved
  8.            Freely Distributable for non-profit only
  9.  
  10.     -- Refer to end of file for upgrade history --
  11.  
  12.                   (I)
  13.                 OVERVIEW
  14.  
  15.     Backup and Restore (same executable, just renamed) allow you to backup
  16.     any directory tree with optional compression, and later extract all
  17.     or part of the tree.  The protection, date, and file comment is saved
  18.     with each file.
  19.  
  20.     SEE SECTION (6), FLOPICAL BACKUP, for options pertaining to backing
  21.     up directly to floppies.
  22.  
  23.     LIMITATIONS:    When using -c (compress), the entire result of the
  24.     compressed file must fit into memory.  Any files (after compression,
  25.     if any) larger than a floppy when backing up to floppies cannot be
  26.     handled yet.
  27.  
  28.     BACKUP/RESTORE can also be used to enclose a set of files or
  29.     directory tree for file transfer:
  30.  
  31.     backup dir -ooutfile.bak        create an archive
  32.     restore outfile.bak            restore an archive
  33.     restore -t outfile.bak            list an archive
  34.  
  35.  
  36.                   (I)
  37.                   INSTALLATION
  38.  
  39.     Copy the (1) executable to your C: directory twice, naming one
  40.     'Backup' and the other 'Restore'.  The program looks at the first
  41.     character of its name to determine whether the default is to backup
  42.     or restore.  If you don't have the space, all is not lost ... you
  43.     simply need to specify backup or restore explicitly with the options
  44.     (-b or -r).
  45.  
  46.                    (2)
  47.                  EXOTIC FEATURES
  48.  
  49.     Backup does not write directory trees which contain no files.  Thus,
  50.     when doing incremental backups on a large hard disk, the structure of
  51.     directory sub-trees which have no new files in them will not be
  52.     written.  So if you only modified a couple of files since the last
  53.     backup, there won't be 50K of structure-overhead.
  54.  
  55.     You can specify compression (-c) in the backup.  All files are
  56.     compressed (there must be enough RAM to hold the largest file in
  57.     its compressed state).  Those files which would turn out larger after
  58.     compression than before are NOT compressed.  Certain file suffixes
  59.     cause the compression attempt to be skipped entire:  .Z, .ARC, and .ZOO
  60.     files
  61.  
  62.       IT IS SUGGESTED YOU USE THE COMPRESSION FEATURE EVEN THOUGH IT
  63.       SLOWS DOWN THE BACKUP.  The resulting backup file will be
  64.       significantly reduced in size.  Even though a full backup will
  65.       take a long time, you only do that every once in a while and
  66.       as incremental backups are shorter, they take much less time.
  67.  
  68.     'Pick' patterns are supported (backup only paths which match the
  69.     specified patterns), and 'Discard' patterns are supported (do not backup
  70.     paths which match the specified patterns).    Discard patterns override
  71.     Pick patterns.
  72.  
  73.     Any file or directory which contains the keyword NOBACK in the
  74.     comment field is not backed up.
  75.  
  76.                   (3)
  77.                 OPTIONS
  78.  
  79.     Here is a list of Backup/Restore options.
  80.  
  81.     -0    (Restore) Causes all files to be restore to the current
  82.         directory (or -odirectory) rather than breaking them out
  83.         into a directory tree.
  84.  
  85.     -A    ARCHIVE.
  86.         (Backup) Causes the archive bit to be set on files
  87.         being backed up.
  88.  
  89.         (Restore):  If specified, the archive bit is cleared on
  90.         restored files.  Otherwise the archive bit will be set,
  91.         causing the files to be backed up again on the next
  92.         incremental backup.
  93.  
  94.     -U    UPDATE.  (Backup) Restricts the backup to only those files
  95.         which do not have the archive bit set.    Additionaly, the
  96.         structure of empty directory trees is not saved.
  97.  
  98.     -b    BACKUP    (this is the default if the first character in
  99.         the executable is a 'b')
  100.  
  101.     -r    RESTORE (this is the default if the first character in
  102.         the executable is an 'r')
  103.  
  104.     -a    APPEND (Backup)     Cause the backup to be appended to
  105.         the specified (-o) file rather than overwriting it.  Useful
  106.         for incremental backups.
  107.  
  108.     -c    COMPRESS (Backup)   Cause all files to be compressed, if
  109.         possible.  Restore automatically decompresses files which
  110.         have been compressed.  This is the same algorithm used
  111.         in the UNIX compress command.
  112.  
  113.         NO COMPRESSION WILL EVEN BE ATTEMPED ON FILES WITH THE
  114.         FOLLOWING SUFFIXES: .Z .ARC .ZOO
  115.  
  116.     -Cpat    Add the pattern to the list of patterns that are assumed
  117.         to be compressed already (so we don't waste time trying to
  118.         compress them if the -c option has been given
  119.  
  120.         Defaults:   *.ZOO *.ARC *.LZH *.Z
  121.  
  122.     -f[#kb] Turn on backup fragmentation and specify the fragment size,
  123.         default 800K (for backing up to floppies).  NOTE: Currently,
  124.         files larger than the fragment size cannot be backed up!
  125.  
  126.         Note: a suffix is added to the file name w/ a sequence
  127.         number, but each fragment is a complete backup file unto
  128.         itself and may be restored out of order.
  129.  
  130.         Any numerical value specified is in K, i.e. -f800 == 800K
  131.  
  132.         Note: prompting is enabled when one or more -F options
  133.         are given.  -f does not automatically enable prompting.
  134.  
  135.     -Fvol:    Add the volume (df0:, df1:, etc..) to the drive sequencing
  136.         list.  The idea is to specify several -F options which are
  137.         cycled through and prefix each fragment.  This also
  138.         enables prompting... the program prompts whenever it
  139.         switches to the next fragment.
  140.  
  141.         If -F is not specified at all and -f is, no prompting
  142.         occurs.
  143.  
  144.     -s    Only display directories as we go along
  145.  
  146.     -S    Silent... don't display files or directories
  147.  
  148.     -v    Verbose... display those files which will NOT be backed
  149.         up as well as those that will.
  150.  
  151.     -l/-t    (both do the same thing).  (Restore)   LIST the archive
  152.         only, do not do an actual restore.
  153.  
  154.     -T    (Restore)   Restore ONLY the timestamp, comment, and
  155.         protection fields.  This is incredibly useful to
  156.         restore timestamp information to files that already
  157.         exist.    NO files are overwritten or created on the
  158.         destination volume(s).
  159.  
  160.     -n#    (Backup)    Sets the output buffer size, in KILOBYTES.
  161.         Default is 64.
  162.  
  163.     -pPAT    (Backup)    Restrict the backup to files which match the
  164.         specified pattern.  Up to 32 patterns may be specified.
  165.  
  166.         (Restore)   Extract only those files which match the
  167.         specified pattern.
  168.  
  169.         NOTE:  The pattern is matched with the COMPLETE PATH as
  170.         shown in the -t option.  '*' and '?' wildcarding is supported
  171.  
  172.     -dPAT    (Backup)    Do not backup files which match the specified
  173.         pattern.   Up to 32 patterns may be specified.
  174.  
  175.         (Restore)   Do not extract files which match the specified
  176.         pattern.
  177.  
  178.         NOTE: The pattern is matched with the COMPLETE PATH as
  179.         shown in the -t option.  '*' and '?' wildcarding is supported.
  180.  
  181.     -oFILE    (Backup)    Specify the OUTPUT FILE for a backup.  IF NO
  182.         OUTPUT FILE IS SPECIFIED, NO OUTPUT FILE IS CREATED.  I.E.
  183.         you can take a second pass just to set the archive bit.
  184.  
  185.         (Restore)   Specify the directory to place the restored
  186.         directory tree.  (This overrides the volume the backup
  187.         was saved from).  If no directory specified, the original
  188.         volume used in the backup will be restored to.    If no
  189.         volume was specified in the backup but rather a relative
  190.         path was, the restore will be relative to the current
  191.         directory.
  192.  
  193.     -Ooffset (Restore)  Specify beginning offset in file from which
  194.         to start restore.  Useful for skipping bad sectors when
  195.         a file header occurs or to get around any bug that shows
  196.         up in backup / restore.
  197.  
  198.                   (4)
  199.               STANDARD METHOD OF BACKING UP
  200.  
  201.     Note that with combinations of -o, -A, and -U, you have many choices
  202.     available to you when backing up files.  For hard disks, backups are
  203.     normally done in two phases:
  204.  
  205.     -Once a month do a complete backup of your hard disk
  206.  
  207.     -Every day do a much smaller 'incremental' backup which backs
  208.      up only those files which have been modified/created since the
  209.      last backup.
  210.  
  211.     The master backup, plus the N incremental backups together
  212.     reconstruct your disk up to the moment.  After a while the
  213.     number of incremental backups will be so great (and messy),
  214.     that you will want to do another complete backup and start
  215.     again.
  216.  
  217.     IN THIS WAY, the COMPRESS option can be put to good use.  The
  218.     incremental backups are usually small, and can be compressed
  219.     relatively quickly.  The complete backup should also be compressed
  220.     (-c in case you forgot) though this will take a much longer time...
  221.     but then again the complete backup is not done every day.
  222.  
  223.     UPDATING THE ARCHIVE BIT ON THE FLY VERSES TAKING A SECOND PASS.
  224.     Updating the archive bit involves writing to the disk.  For complete
  225.     safety you probably do NOT want to update the archive bit while you
  226.     are backing up the files in question.  The following two-pass method
  227.     works well:
  228.  
  229.     *** NOTE QUOTES.  Under a standard Amiga shell you do not need quotes
  230.     to escape out wildcards from shell expansion.
  231.  
  232.         (COMPLETE BACKUP)
  233.  
  234.     backup    -c -d"*.o" volume: -ooutput
  235.     backup    -A volume:
  236.  
  237.         (INCREMENTAL BACKUP)
  238.  
  239.     backup -U -c -d"*.o" volume: -ooutput
  240.     backup -A volume:
  241.  
  242.     The -d option is saying "Don't backup all those object modules I left
  243.     laying around".
  244.  
  245.     The first command backs up only those files which have be modified
  246.     or created but does NOT update the archive bit.  The second command
  247.     updates the archive bit without doing anything else (no output file
  248.     is specified and thus none is created).  The second command goes
  249.     extremely quickly since files are not actually read.
  250.  
  251.     For your INCREMENTAL backups, risking modifying the archive bit while
  252.     backing the files up is feasible,  Since very few files will be
  253.     backed up (comparitively):
  254.  
  255.     backup -a -UA -c -d"*.o" volume: -ooutput
  256.  
  257.     In this case I use the -a option (append).  You might NOT want to do
  258.     this and save the incremental backups as separate files.
  259.  
  260.  
  261.                   (5)
  262.               STANDARD METHOD OF RESTORING
  263.  
  264.     Restoring a backup to the original volume: (Restore or Backup -r)
  265.  
  266.     NOTE:  If the -A option is specified, restored files will have
  267.     their Archive bit set.  If -A is NOT specified, files will have
  268.     their archive bit cleared and will thus be re-backed up on the next
  269.     incremental backup.
  270.  
  271.     NOTE:  When restoring files, remember that the incremental backups
  272.     will have the newest modifications and should be specified LAST:
  273.  
  274.     Restore completebkfile incr1 incr2 incr3....
  275.  
  276.     Partial Restore using -p:
  277.  
  278.     Restore -pstuffIWant bkfile1 bkfile2 bkfile3...
  279.  
  280.     NOTE:  When changing the destination of the restore with the -o
  281.     option the -p<path> paths are compared against the destination path
  282.     used to create the file.  Use -t (list archive but do not restore)
  283.     along with -o (set destination directory) to get a non-destructive
  284.     visual indication of the exact paths restore is using if you are
  285.     confused.
  286.  
  287.     ARCHIVE LISTING:
  288.  
  289.     Restore -t bkfile1 bkfile2....
  290.  
  291.     NOTE:    Two 'sizes' are given in the listing.  The first
  292.     is the # bytes the file takes up in the archive, the
  293.     second is the actual size of the file.
  294.  
  295.  
  296.                   (6)
  297.               FLOPICAL BACKUP AND RESTORE
  298.  
  299.     There are two problems associated with floppy backup and restore:
  300.  
  301.     (1) A single file on the HD may be two big for a single floppy
  302.     (2) It may take a lot of floppies to backup an HD
  303.  
  304.     Additionaly, one wants the following conveniences:
  305.  
  306.     (1) Be able to backup to a logical progression of (floppy) drives,
  307.     inserted blank disks in while the system is working on other
  308.     drives.
  309.  
  310.     (2) Be able to restore the same way
  311.  
  312.     (3) If one or more floppies is destroyed be able to restore from the
  313.     remaining floppies.
  314.  
  315.         Currently, you can specify which devices to cycle through
  316.         with the -F option (-Fdf0: -Fdf1: -Fdf2:), but BACKUP will
  317.         always prompt you before continuing.  Since it uses the
  318.         console device, you can specify the yes response as many
  319.         times as you have floppies in ready drives.
  320.  
  321.         Currently, files larger than the specified -f size (800K
  322.         default) cannot be handled if using -f/-F ... However, by
  323.         enabling compression larger files can still fit.
  324.  
  325.         Currently, the entire compressed result of a file must be
  326.         able to fit into memory during the backup.
  327.  
  328.  
  329.                    ***
  330.  
  331.     BACKUP.    Specify the -f option and then -Fvol: for each floppy
  332.     drive (in the order you want) to backup to.  Example:
  333.  
  334.     -f -Fdf0: -Fdf1:
  335.  
  336.     (Also keep in mind all the options listed in sections (3), (4), & (5))
  337.     Currently, you must have PRE-FORMATTED all your backup disks since the
  338.     backup/restore works through normal files.    The system will prompt for
  339.     readyness every time it completes a section.
  340.  
  341.     The backup process never deletes files, only creates or overwrites
  342.     them.  Thus, accidently sticking in a non-blank or incorrect backup
  343.     disk will probably result in a disk-full requester.... not Fatal, though
  344.     inconvenient.
  345.  
  346.     You must still specify the -o option to name the output file, which will
  347.     be prefixed with the next -F volume in sequence and suffixed with the
  348.     sequence number. (.nn)  The disk labels for your floppies may all be
  349.     the same.
  350.  
  351.     EXAMPLE:
  352.  
  353.     backup    -c -d"*.o" -f -Fdf0: -Fdf1: -Fdf2: volume: -oxxbak
  354.     backup    -A volume:
  355.  
  356.     NOTE:    You do NOT specifiy a volume prefix in the -o option ..
  357.     those specified by -F are automatically cycled through as the
  358.     prefix.
  359.  
  360.  
  361.     * If your hard disk has enough space on it I suggest you backup to an
  362.       alternate partition using only -f (not -F which forces user prompts),
  363.       then copy the chunks to floppies after the entire backup has
  364.       completed.
  365.  
  366.                    ***
  367.  
  368.     RESTORE.    Restore works the same way.  EACH DISK IS INDEPENDANT!    You
  369.     may insert disks in any order to be restored.  Simply execute the
  370.     standard restore command in section (5) for each floppy.
  371.  
  372.     Destroyed disks may be skipped.  Currently, no support for partially
  373.     restored disks exists... i.e. the archive has to be clean.
  374.  
  375. V2.06:
  376.     Now allows -o<filename> or -o <filename> ... this exists for
  377.     all other options that take an argument except -f<KBytes>
  378.  
  379.     -p now works (to pickout elements in a restore or backup).  It
  380.        didn't before due to a previous 'fix' that I had done.
  381.  
  382. V2.05:
  383.     Upon getting an illegal format error Restore attempts to scan
  384.     ahead to the next file entry.  Note that one file entry may
  385.     be lost and directory information may be lost.    Error messages
  386.     report the offset in the file that the error occured.
  387.  
  388.     A new option, -Ooffset, has been added to allow you to tell
  389.     restore to start at a specific offset in the file to circumvent
  390.     sector read errors and any bugs that might come up with
  391.     backup and restore.
  392.  
  393.     -O also disables exit-on-NULL-or-^Z .. i.e. it needs a real
  394.     end of file before it assumes the end of an archive.  Thus,
  395.     -O alone may be enough to have it really go at a damaged
  396.     archive.
  397.  
  398. V2.04:
  399.     Restore exits without a warning message if it comes across
  400.     a 0 or ^Z when it is expecting a header (so you can restore
  401.     from XModem files)
  402.  
  403.     entries are checksumed (so you don't think you've got a
  404.     valid archive if you download over a noisy line).
  405.  
  406.  
  407. V2.03:
  408.     Restore:    a file named the same as its parent directory didn't
  409.             get restored if restore had to create that parent
  410.             directory.    i.e. ram:etc/etc (the last etc being a file
  411.             name) would not get restored.
  412.  
  413.             Restore now properly restores things into the directory
  414.             specified by the -o option.  Before it would only do
  415.             that if a volume (blah:) was specified as the first
  416.             path segment.
  417.  
  418.             Restore now creates the directory specified by -o if
  419.             it does not already exist.    Also, lines like this:
  420.  
  421.             restore -oblah relative_path
  422.  
  423.             would fail w/ restore not being able to find the
  424.             relative path (it had already cd'd somewhere else).
  425.  
  426.     Backup:     Empty directory trees are now saved.  Before backup
  427.             would not save them.  However, if -U is specified
  428.             empty directory trees are not saved. (i.e. the master
  429.             backup has the whole directory structure while
  430.             incremental backups have only the structure pertaining
  431.             to newly saved files).
  432.  
  433.     -Cpat        New option, add pattern to list of patterns that will
  434.             no be compressed if -c is given.
  435.  
  436.     -0        (Restore): Causes all files to be restored to the
  437.             current (or -o) directory.
  438.  
  439. V2.02:
  440.     More minor bug fixes
  441.  
  442. V2.01:
  443.     Fixed bugs in restore (did not restore files into the proper
  444.     directories), and in backup (-a append flag did not work)
  445.  
  446. V2.00:
  447.     First release of V2
  448.  
  449.